Skip to content

fix: ToolObservationMemory retriever preserves metadata and rejects false positives - #100

Merged
RecursiveIntell merged 1 commit into
mainfrom
fix/tool-observation-retriever-data-integrity
Nov 26, 2026
Merged

RecursiveIntell merged 1 commit into
mainfrom
fix/tool-observation-retriever-data-integrity

Conversation

@RecursiveIntell

Copy link
Copy Markdown
Owner

Corrects the merged Lane B retriever:

  • find_similar_tool_observations now re-reads each candidate by fact_id,
    requires source="llm-tool-runtime" + kind="tool_observation_v1", and
    reconstructs record metadata from the canonical fact.
  • Returns typed error for recognized records with missing/malformed metadata.
  • Skips stale index candidates (concurrent delete), non-fact sources,
    wrong-scope, other-source, and wrong-kind candidates.
  • Documents that search truncates before metadata filtering; may return
    fewer than limit observations.
  • Adds test ordinary_facts_in_the_same_scope_are_not_tool_observations
    proving non-observation facts (even with same source) are excluded.

All 69 llm-tool-runtime tests pass; knowledge-runtime + bitemporal-runtime + claim-ledger full suites pass locally. CI will verify. No new dependencies; no cycle introduced (cargo tree -p semantic-memory --depth 3 | grep -c llm-tool-runtime = 0).

Follow-up to merged commit cc660a7e (PR #98).

…alse positives

- find_similar_tool_observations now re-reads each candidate by fact_id,
  requires source="llm-tool-runtime" + kind="tool_observation_v1", and
  reconstructs record metadata from the canonical fact.
- Returns typed error for recognized records with missing/malformed metadata.
- Skips stale index candidates (concurrent delete), non-fact sources,
  wrong-scope, other-source, and wrong-kind candidates.
- Documents that search truncates before metadata filtering; may return
  fewer than `limit` observations.
- Adds test `ordinary_facts_in_the_same_scope_are_not_tool_observations`
  proving non-observation facts (even with same source) are excluded.
- All 69 llm-tool-runtime tests pass; knowledge-runtime + bitemporal-runtime
  + claim-ledger full suites pass.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T00:46:38.311188Z
We couldn’t complete this review. Comment @codex review to try again.
7b6565c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@RecursiveIntell
RecursiveIntell merged commit 1c81c58 into main Nov 26, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant